home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / VQPFILM.S < prev   
Text File  |  1993-03-27  |  2KB  |  54 lines

  1. ;*========================================================================
  2. ;* VDIFAST Public Domain VDI bindings.
  3. ;*========================================================================
  4.  
  5.  
  6. ;*------------------------------------------------------------------------
  7. ;*------------------------------------------------------------------------
  8.  
  9.           globl     _vqp_filmname
  10. _vqp_filmname:
  11. ;    .cargs    #8,handle.w,index.w,namestr.l
  12.  
  13. handle      =         8
  14. index      =         10
  15. namestr   =         12
  16.  
  17.           link        a6,#-52             ;* Allocate intout[26].
  18.  
  19. ;          VContrl    #5,#92,,#1
  20.           move.w    handle(a6),-(sp)    ; contrl[6]
  21.           move.w    #92,-(sp)            ; contrl[5]
  22.           clr.w     -(sp)                ; contrl[4]
  23.           move.w    #1,-(sp)            ; contrl[3]
  24.           subq.l    #2,sp                ; contrl[2]
  25.           clr.w     -(sp)                ; contrl[1]
  26.           move.w    #5,-(sp)            ; contrl[0]
  27.  
  28.           subq.l    #4,sp                ;* -> ptsout
  29.           pea        -68(a6)             ;* -> intout
  30.           subq.l    #4,sp                ;* -> ptsin
  31.           pea        index(a6)            ;* -> intin
  32.           pea        16(sp)                ;* -> contrl
  33.  
  34.           move.l    sp,d1
  35.           jsr        vditrap
  36.           lea        20(sp),sp            ;* clean off vdipb groodah.
  37.  
  38.           lea        -52(a6),a0            ;* Pointer to intout.
  39.           move.l    namestr(a6),a1        ;* Pointer to caller's string.
  40.           move.w    8(sp),d0            ;* load contrl[4]: outstr length.
  41.           beq        punt                ;* if zero, no string to return.
  42. strloop:
  43.           move.w    (a0)+,d1            ;* Return normal string from
  44.           move.b    d1,(a1)+            ;* intout[0-24].  Copy low byte of
  45.           subq.w    #1,d0                ;* decrement string count.
  46.           bne.b     strloop             ;* each word to string byte.
  47.           clr.b     (a1)                ;* force nullterm onto string.
  48. punt:
  49.           move.w    8(sp),d0            ;* retval is contrl[4].
  50.           unlk        a6
  51.           rts
  52.  
  53.           end
  54.